package PushSDK

import (
	"net/http"
)

type BaiduPush struct {
	Ak         string       // Public key provided by Baidu
	Sk         string       // Security key provide by Baidu
	ClientType int          // Device Type, 3 for Android And 4 for Ios
	RequestId  int          // RequestId returned from Server
	Client     *http.Client // Request Client
	Err        error        // Error Code
	Query      string       // Domain Name
}

type PushOption struct {
}

type Notification struct {
	Title				string 	`json:"title"`
	Description			string 	`json:"description"`
	Notification_builder_id		int64 	`json:"notification_builder_id"`
	Notification_basic_style	int64 	`json:"notification_basic_style"`
	Open_type			int64 	`json:"open_type"`
	Url				string 	`json:"url"`
	Pkg_content			string	`json:"pkg_content"`
	//Custom_content		string 	`json:"custom_content"`
}

type PushSingleDevOpt struct {
	ChannelId    string `form:"channel_id" required:"yes"`
	Msg          string `form:"msg" required:"yes"`
	MsgType      int    `form:"msg_type" required:"no"`
	MsgExpires   int    `form:"msg_expires" required:"no"`
	DeployStatus int    `form:"deploy_status" required:"no"`
}

type PublicResp struct {
	RequestId int    `json:"request_id"`
	ErrCode   int    `json:"error_code"`
	ErrMsg    string `json:"error_msg"`
}

type PushSingleDevRespData struct {
	MsgId    string `json:"msg_id"`
	SendTime int64    `json:"send_time"`
}

type PushSingleDevResp struct {
	PublicResp
	ResponseData PushSingleDevRespData `json:"response_params"`
}

type PushAllOpt struct {
	SendTime	string `form:"send_time" required:"no"`
	Msg		string `form:"msg" required:"yes"`
	MsgType		int    `form:"msg_type" required:"no"`
	MsgExpires	int    `form:"msg_expires" required:"no"`
	DeployStatus	int    `form:"deploy_status" required:"no"`
}

type PushAllRespData struct {
	MsgId		string `json:"msg_id"`
	TimerId		string `json:"timer_id"`
	SendTime 	int64    `json:"send_time"`
}

type PushAllResp struct {
	PublicResp
	ResponseData PushAllRespData `json:"response_params"`
}

type PushTagOpt struct {
	Tag		string `form:"tag" required:"yes"`
	Msg		string `form:"msg" required:"yes"`
	MsgType		int    `form:"msg_type" required:"no"`
	MsgExpires	int    `form:"msg_expires" required:"no"`
	DeployStatus	int    `form:"deploy_status" required:"no"`
	Type		int    `form:"type" required:"yes"`
}

type PushTagRespData struct {
	MsgId		string `json:"msg_id"`
	TimerId		string `json:"timer_id"`
	SendTime 	int64    `json:"send_time"`
}

type PushTagResp struct {
	PublicResp
	ResponseData PushTagRespData `json:"response_params"`
}

type CreateTagOpt struct {
	Tag		string 	`form:"tag" required:"yes"`
	DeviceType	string	`form:"device_type" required:"no"`
	Expires		int    	`form:"expires" required:"no"`
}

type CreateTagRespData struct {
	Tag	string `json:"tag"`
	Result 	int    `json:"result"`
}

type CreateTagResp struct {
	PublicResp
	ResponseData CreateTagRespData `json:"response_params"`
}

type DelTagOpt struct {
	Tag		string 	`form:"tag" required:"yes"`
	DeviceType	string	`form:"device_type" required:"no"`
	Expires		int    	`form:"expires" required:"no"`
}

type DelTagRespData struct {
	Tag	string `json:"tag"`
	Result 	int    `json:"result"`
}

type DelTagResp struct {
	PublicResp
	ResponseData DelTagRespData `json:"response_params"`
}

type AddDevToTagOpt struct {
	Tag		string 	`form:"tag" required:"yes"`
	ChannelIds	string	`form:"channel_ids" required:"yes"`
	DeviceType	string	`form:"device_type" required:"no"`
}

type AddDevToTagRespData struct {
	Result 	[]int    `json:"result"`
}

type AddDevToTagResp struct {
	PublicResp
	ResponseData AddDevToTagRespData `json:"response_params"`
}

type DelDevFromTagOpt struct {
	Tag		string 	`form:"tag" required:"yes"`
	ChannelIds	string	`form:"channel_ids" required:"yes"`
	DeviceType	string	`form:"device_type" required:"no"`
}

type DelDevFromTagRespData struct {
	Result 	[]int    `json:"result"`
}

type DelDevFromTagResp struct {
	PublicResp
	ResponseData DelDevFromTagRespData `json:"response_params"`
}
